//
//  HotCell.m
//  wedding
//
//  Created by 常宽 on 15/1/16.
//  Copyright (c) 2015年 常宽. All rights reserved.
//

#define WIDTH self.contentView.frame.size.width
#define HEIHT self.contentView.frame.size.height

#import "HotCell.h"
#import "HPHot.h"       // 自定义封装的View

#import "HomePageModel.h"

@interface HotCell ()
/// 自定义封装的View
@property (nonatomic, retain)HPHot *hotView;

@end

@implementation HotCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        // 阻止cell被选中
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        // 必要时,初始化self.model
        
        self.hotView = [[HPHot alloc]init];
        [self.contentView addSubview:_hotView];
    }
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    self.hotView.frame = CGRectMake(10, 5, WIDTH - 20, HEIHT - 10);
    self.hotView.layer.cornerRadius = 3;
     self.hotView.clipsToBounds = YES;
    [self.hotView xxxxchuanzi:self.model];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
